<!DOCTYPE html>
<html lang="en">
<head>
  {% block head %}
  <title>{% block title %}{% endblock %}</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">

  <meta property="qc:admins" content="06702771626033607" />
  <meta property="wb:webmaster" content="f1272e303de53166" />


  <!-- 新 Bootstrap 核心 CSS 文件 -->
  <link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css">
  <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
  <script src="//cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
  <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
  <script src="//cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>  {% endblock %}
</head>
<body>

<nav class="navbar navbar-default">
  <div class="container-fluid">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="{{ url_for('main.index') }}">一起来 POST</a>
    </div>
    <div class="collapse navbar-collapse" id="myNavbar">
      <ul class="nav navbar-nav">
        <li><a href="{{ url_for('main.index') }}"><span class="glyphicon glyphicon-cloud-upload"></span> 新 POST</a></li>
        {% if current_user.is_authenticated() %}
        <!--<li><a href="#"><span class="glyphicon glyphicon-star"></span> 我的 POST</a></li>-->
        {% endif %}
      </ul>
      <ul class="nav navbar-nav navbar-right">
        {% if current_user.is_authenticated() %}
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown">
            <p><span class="glyphicon glyphicon-user"> {{ current_user.screenname }}</p>
          </a>
          <ul class="dropdown-menu">
            <li><a href="{{ url_for('account.basic') }}"><span class="glyphicon glyphicon-cog"></span> 个人信息</a></li>
            <li><a href="{{ url_for('auth.logout') }}"><span class="glyphicon glyphicon-log-out"></span> 登出</a></li>
          </ul>
        </li>
        {% else %}
        <li><a href="{{ url_for('auth.login') }}"><span class="glyphicon glyphicon-log-in"></span> 登陆</a></li>
        {% endif %}
      </ul>
    </div>
  </div>
</nav>

<div class="container">
  {% block container %}
  {% for message in get_flashed_messages() %}
  <div class="alert alert-warning">
    <button type="button" class="close" data-dismiss="alert">&times;</button>
    {{ message }}
  </div>
  {% endfor %}
  {% endblock %}
</div>

{% block scripts %}
{{ moment.include_moment() }}
{% endblock %}

</body>
</html>
